FROM openjdk:8

MAINTAINER ycl

# VOLUME 指定临时文件目录为/tmp，在主机/var/lib/docker目录下创建了一个临时文件并链接到容器的/tmp
VOLUME /tmp
# 将jar包添加到容器中并更名为training-agency.jar
ADD yami-shop-api-0.0.1-SNAPSHOT.jar  ZKMall.jar
# 运行jar包
RUN bash -c 'touch /ZKMall.jar.jar'
ENTRYPOINT ["java","-jar","/ZKMall.jar"]
#暴露8083端口作为微服务
EXPOSE 8086

#RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
#
#RUN mkdir -p /opt/projects/mall4j
#
#WORKDIR /opt/projects/mall4j
#
#EXPOSE 8086
#
#ADD ./yami-shop-api/target/yami-shop-api-0.0.1-SNAPSHOT.jar ./
#
#CMD java -jar -Xms1024m -Xmx1024m -Xmn256m -Xss256k -XX:SurvivorRatio=8 -XX:+UseConcMarkSweepGC -Dspring.profiles.active=docker yami-shop-api-0.0.1-SNAPSHOT.jar